<template>
  <div>
    <h2>首页</h2>
    <el-button type="primary" @click="getOrder">获取当前用户订单</el-button>
  </div>
</template>

<script setup lang="ts">
import UserAPI from "@/api/system/user.api";

const getOrder = async () => {
  // 1. 发送请求获取当前用户id订单数据，接口那边会通过token解析出用户的id
  const data = await UserAPI.getOrder();
  console.log(data);
};
</script>

<style scoped></style>
